import { createStore } from "vuex";
import { post } from "./post/index";
import { user } from "./user/index";
import { comment } from "./comment/index";

export const store = createStore({
  modules: {
    user,
    post,
    comment,
  },
  state() {
    return {
      name: "text",
      showUpload: false,
      showPostDetail: false,
    };
  },
  mutations: {
    changeUploadVal(state, val) {
      state.showUpload = val;
    },
    changePostDetail(state, val) {
      state.showPostDetail = val;
    },
  },
  actions: {},
});
